<div class="convocatorias index">
	<h2><?php __('Convocatorias');?></h2>
	<table>
		<tr>
			<td><?php echo $this->Html->link($this->Html->image('convocatoria_nueva.png', array('alt'=> __('Nueva Convocatoria', true), 'border' => '0')),
										'../convocatorias/add/',array('escape' => false, 'title'=>'Convocatorias')); ?></td>
		</tr>
	</table>
	<table cellpadding="0" cellspacing="0">
	<tr>			
			<th><?php echo $this->Paginator->sort('Perfil', 'Convocatoria.perfile_id');?></th>
			<th><?php echo $this->Paginator->sort('departamentos');?></th>
			<th><?php echo $this->Paginator->sort('fecha_inicio');?></th>
			<th><?php echo $this->Paginator->sort('fecha_fin');?></th>			
			<th><?php echo $this->Paginator->sort('estado');?></th>
			<th><?php echo $this->Paginator->sort('Solicitudes');?></th>
			<th><?php echo $this->Paginator->sort('Aprobadas');?></th>
			<th><?php echo $this->Paginator->sort('Rechazadas');?></th>			
	</tr>
	<?php
	$i = 0;
	foreach ($convocatorias as $convocatoria):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
	?>
	<tr<?php echo $class;?>>		
		<td style="width:110px;">
			<?php echo $convocatoria['Perfile']['cargo']; ?>
		</td>
		<td style="width:190px;"><?php echo $convocatoria['departamentos']; ?>&nbsp;</td>
		<td><?php echo $convocatoria['Convocatoria']['fecha_inicio']; ?>&nbsp;</td>
		<td><?php echo $convocatoria['Convocatoria']['fecha_fin']; ?>&nbsp;</td>
		<td><?php echo $convocatoria['Convocatoria']['estado']; ?>&nbsp;</td>
		<td style="text-align:center;"><?php echo $convocatoria['solicitudes']; ?>&nbsp;</td>
		<td style="text-align:center;"><?php echo $convocatoria['aprobadas']; ?>&nbsp;</td>
		<td style="text-align:center;"><?php echo $convocatoria['rechazadas']; ?>&nbsp;</td>
		<td>
			<?php echo $this->Html->link($this->Html->image('edit.png', array('alt'=> __('Editar', true), 'border' => '0')),'edit/'.$convocatoria['Convocatoria']['id'],array('escape' => false)); ?>
			<?php echo $this->Html->link($this->Html->image('view.png', array('alt'=> __('Ver', true), 'border' => '0')),'view/'.$convocatoria['Convocatoria']['id'],array('escape' => false)); ?>
			<?php echo $this->Html->link($this->Html->image('delete.png', array('alt'=> __('Eliminar', true), 'border' => '0')),'delete/'.$convocatoria['Convocatoria']['id'],array('escape' => false)); ?>			
		</td>
	</tr>
<?php endforeach; ?>
	</table>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Pagina %page% de %pages%, mostrando %current% registros de %count% total, empezando en %start%, terminando en %end%', true)
	));
	?>	</p>

	<div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __('Anterior', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
 |
		<?php echo $this->Paginator->next(__('Siguiente', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
</div>
<div class="actions">
	<?php
		echo $this->Form->menu($this->Access->getMy('id'),$this->Access->getMy('group_id'));	
	?>
</div>